import { mergeWith, isArray } from 'lodash-es'

function customizer(objValue, srcValue) {
  if (isArray(objValue)) {
    return objValue.concat(srcValue)
  }
}

export default (object, other) => {
  return mergeWith(object, other, customizer)
}
